package cc.openkit.kitadmin_2.weui.controller;

import cc.openkit.kitadmin_2.service.GoodsService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/goods")
public class GoodsController {
    @Autowired
    GoodsService goodsService;

    @RequestMapping("/queryGoods")
    public String queryGoods(Model model,String name){
        model.addAttribute("goods",goodsService.queryGoodsByName(name));
        return "goods/queryGoods";
    }
}
